package com.frozendogtears.audiogame;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.audio.Sound;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion;

public class Assets {
	public static TextureAtlas m_atlas;
	public static AtlasRegion m_ground;
	public static AtlasRegion m_player;
	public static Sound m_jumpSound;
	public static Sound m_powerUpSound;
	
	public static Texture m_testTexture;

	public static void load() {
		//textures
		m_atlas = new TextureAtlas(Gdx.files.internal("gfx/items@2x.txt"));
		
		m_ground = m_atlas.findRegion("ground");
		m_player = m_atlas.findRegion("test");	
		
		m_testTexture = new Texture(Gdx.files.internal("gfx/obstacletexture.png"));		
		
		//sounds
		m_jumpSound = Gdx.audio.newSound(Gdx.files.internal("sfx/jump.wav"));
		m_powerUpSound = Gdx.audio.newSound(Gdx.files.internal("sfx/powerup.wav"));
				
		//music
		
//		if(Settings.soundEnabled)
//		{
//			music.play();
//		}
	}

	public static void reload() {
		m_atlas.dispose();
		m_atlas = new TextureAtlas(Gdx.files.internal("gfx/items@2x.txt"));
	}
}
